<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/css/layui.min.css">
    <link type="text/css" href="${pageContext.request.contextPath}/shop/admin/css/Admin.css" rel="stylesheet"/>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <%@include file="../header-side.jsp"%>
    <script>
        if((window.location.pathname).indexOf('notice')>=0 || (window.location.pathname).indexOf('Notice')>=0){
            document.getElementsByClassName('notice')[0].className+='  layui-this '
        }
    </script>
    <div class="layui-body">
        <span class="layui-breadcrumb">
							<a href="${pageContext.request.contextPath}/shop/client">首页</a>
							<a href="${pageContext.request.contextPath}/shop/admin/notice">公告管理</a>
							<a><cite>编辑</cite></a>
						</span>
        <hr>
        <div class="layui-panel" style="width: 500px;margin: 100px auto">
            <div class="layui-card-header">编辑公告</div>
            <div style="padding: 30px;">
                <form class="layui-form" action="<c:url value="/shop/modifyNotice2"/>">
                    <div class="layui-form-item">
                        <label class="layui-form-label">ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="id" class="layui-input" readonly="readonly" value="${notice.n_id}"
                                   placeholder="无需填写">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" class="layui-input" value="${notice.title}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">详情</label>
                        <div class="layui-input-block">
                            <textarea name="detail" class="layui-textarea"  lay-verify="required">${notice.details}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">时间</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" name="n_time" id="n_time" value="${notice.n_time}">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                            <button type="button" class="layui-btn  layui-btn-primary" onclick="window.location.href='${pageContext.request.contextPath}/shop/admin/notice'">返回列表</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/layui.min.js"></script>
<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#n_time', //指定元素
            type: 'datetime',
            format: 'yyyyMMddHHmmss'
        });
    });
</script>
</body>

</html>